package com.haixiaoke.flat.workOrder.controller;

import java.util.List;

import com.haixiaoke.auth.AuthCheck;
import com.haixiaoke.saas.common.annotation.RepeatSubmit;
import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.core.page.TableDataInfo;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.workOrder.domain.WorkOrderPerson;
import com.haixiaoke.saas.workOrder.service.IWorkOrderPersonService;
import com.haixiaoke.saas.system.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 工单人员信息Controller
 *
 * @author xiaolong
 * @date 2024-09-02
 */
@RestController
@RequestMapping("/front/flat/workOrder/person")
public class FlatWorkOrderPersonController extends BaseController {
    @Autowired
    private IWorkOrderPersonService workOrderPersonService;

    /**
     * 查询工单人员信息
     */
    @GetMapping("/info")
    @AuthCheck
    public AjaxResult info(WorkOrderPerson workOrderPerson) {
        workOrderPerson.setDesensitizeType(true);
        List<WorkOrderPerson> list = workOrderPersonService.selectWorkOrderPersonAndPendingWorkOrder(workOrderPerson);
        return success(list);
    }

}
